Non-Volatile Memory (NVM) provides an intermediate alternative between high-performance Dynamic Random Access Memory (DRAM) and cost-effective hard disk drives (HDDs). Generally, the read performance of NVM is similar to DRAM and the write performance of NVM is significantly faster than HDDs. It has been proposed to utilize NVM in database systems to provide at least some of the functionality which is currently provided by DRAM. NVM is byte-addressable and writes to NVM are durable, so database data stored therein may be accessed directly after a crash and restart. In contrast, restarting a conventional database would require reloading such database data from hard disk into DRAM.
Replacing DRAM with NVM in a database system poses challenges. For example, a persistent memory leak may result if a process/program dies due to an error occurring after a persistent memory allocation call. A system using DRAM can recover from all such leaks via an application or hardware restart, but such a restart would not necessarily address such leaks in the case of NVM. A consistent and durable NVM block manager is desired which provides block creation/deletion functionality, and efficient handling of block lifecycles across database savepoints and system crashes/restarts.